<?php
/**
 * 后台登录页面
 *
 * Created		: 2011-12-05
 * Modified		: 2011-12-05
 * @link		: http://www.topews.com
 * @copyright	: [PhpFo.Com] (c) 2009-2011
 * @version	: 0.1.0
 * @author		: Joseph Chen (Jsph.chen@gmail.com)
 */

if (isset($_POST['do']) && $_POST['do']=='login')
{
	$ret = App::checkAdmin($_POST['username'], $_POST['password']);
	if ($ret) {
		$result = array(
			'result'	=> true,
			'msg'		=> $GLOBALS['LLoginSucess']."\n".$GLOBALS['LAutoRedirectTip']
		);
	} else {
		$result = array(
			'result'	=> false,
			'msg'		=> App::msg()
		);
	}
	echo json_encode($result);
	exit;
}